import http from './request'


// 客户基本信息
/**
 * 用户详情
 * @param {*} params 
 * @returns 
 */
export const getAllUserInfo = (id) => {
    return http({
        url: '/User/getUserInfo?userId='+id,
        method: 'GET',
    })
}

/**
 * 获取用户基础信息
 * @param {*} params 
 * @returns 
 */
 export const getAllUserList = (data) => {
    return http({
        url: '/User/getUserList',
        method: 'POST',
        data
    })
}

/**
 * 客户保养与关怀
 * @param {*} data 
 * @returns 
 */
 export const userCare = (data) => {
    return http({
        url: '/User/userCare',
        method: 'POST',
        data
    })
}
//客户电站信息
/**
 * 获取电站列表信息
 * @param {*} data 
 * @returns 
 */
export const getUserPowers = (data) => {
    return http({
        url: '/User/getUserPowers',
        method: 'POST',
        data
    })
}
/**
 * 
 * 获取电站详情
 */
 export const getUserPowerInfo = (id) => {
    return http({
        url: '/User/getUserPowerInfo?powerId='+id,
        method: 'GET',
    })
}


/**
 * 获取日志信息
 */
 export const getLogs = (data) => {
    return http({
        url: '/hongyun-training/systemlog/getLogs',
        method: 'POST',
        data
    })
}
//获取首页数据
export const getIndexData = (data) => {
    return http({
        url: '/api/index/list',
        method: 'POST',
        data
    })
}
//满意度
export const customerSatisfaction = (data) => {
    return http({
        url: '/api/index/customerSatisfaction?type='+data.type+'&userId='+data.userId+'&year='+data.year,
        method: 'POST',
    })
}
//剩余容量
export const remainingCapacity = (data) => {
    return http({
        url: '/api/index/remainingCapacity?type='+data.type+'&userId='+data.userId+'&year='+data.year,
        method: 'POST',
    })
}
//货物亏损率
export const lossRateOfGoods = (data) => {
    return http({
        url: '/api/index/lossRateOfGoods?type='+data.type+'&userId='+data.userId+'&year='+data.year,
        method: 'POST',
    })
}
//货主排行
export const shipperRank = (data) => {
    return http({
        url: '/api/index/shipperRank?type='+data.type+'&userId='+data.userId+'&year='+data.year,
        method: 'POST',
    })
}
//货主库存
export const shipperStock = (data) => {
    return http({
        url: '/api/index/shipperStock?type='+data.type+'&userId='+data.userId+'&year='+data.year,
        method: 'POST',
    })
}

//首页右侧数据
export const realTimeData = () => {
    return http({
        url: '/hongyun-training/index/realTimeData',
        method: 'POST',
    })
}
//大屏数据
export const getBigScreen = (year) => {
    return http({
        url: '/hongyun-training/bigScreen/getBigScreen?year='+year,
        method: 'GET',
    })
}
